using System;
using System.Collections.ObjectModel;
using System.Windows;
using System.Windows.Controls;

namespace Waaahsabi.Controls.TheGame
{
	public class MailViewControl : Control
	{
		#region From DependencyProperty
		public static readonly DependencyProperty FromProperty =
		DependencyProperty.Register
			(
			"From",
			typeof(string),
			typeof(MailViewControl),
			new PropertyMetadata("noone@nosystem.nocorporation.notld")
			);

		public string From
		{
			get { return (string)GetValue(FromProperty); }
			set { SetValue(FromProperty, value); }
		}
		#endregion

		#region Subject DependencyProperty
		public static readonly DependencyProperty SubjectProperty =
		DependencyProperty.Register
			(
			"Subject",
			typeof(string),
			typeof(MailViewControl),
			new PropertyMetadata("No subject here.")
			);

		public string Subject
		{
			get { return (string)GetValue(SubjectProperty); }
			set { SetValue(SubjectProperty, value); }
		}
		#endregion

		#region Body DependencyProperty
		public static readonly DependencyProperty BodyProperty =
		DependencyProperty.Register
			(
			"Body",
			typeof(string),
			typeof(MailViewControl),
			new PropertyMetadata("This is the mail body.\nIt can be rather large, but usually people don't write that much.\nReally.")
			);

		public string Body
		{
			get { return (string)GetValue(BodyProperty); }
			set { SetValue(BodyProperty, value); }
		}
		#endregion

		#region CC DependencyProperty
		public static readonly DependencyProperty CCProperty =
		DependencyProperty.Register
			(
			"CC",
			typeof(string),
			typeof(MailViewControl),
			new PropertyMetadata("noone@nosystem.nocorporation.notld; noone@nosystem.nocorporation.notld; noone@nosystem.nocorporation.notld; noone@nosystem.nocorporation.notld; noone@nosystem.nocorporation.notld; noone@nosystem.nocorporation.notld")
			);

		public string CC
		{
			get { return (string)GetValue(CCProperty); }
			set { SetValue(CCProperty, value); }
		}
		#endregion

		public MailViewControl()
		{
			DefaultStyleKey = typeof (MailViewControl);
		}

		public void Reset()
		{
			From = null;
			Subject = null;
			Body = null;
			CC = null;
		}
	}
}